<template>
  <div class="load-err" @click="refresh">
    <van-icon name="replay" size="5rem" />
    <p class="msg">{{errMsg}}</p>
  </div>
</template>

<script>
export default {
  name: 'load-err',
  props: {
    errMsg: {
      type: String,
      default: '加载失败，请点击刷新！'
    }
  },
  methods: {
    refresh () {
      this.$emit('refresh')
    }
  }
}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  @import "~common/stylus/variable"
  .load-err
    text-align: center
    color: $color-gray
    .msg
      margin-top: 2rem
      font-size: 1.5rem
</style>
